home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
NTH_OCC.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
988b
|
36 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_Nth_Occr( cInStr, cInChar, nNthOccr ) --> nInteger
PARAMETERS:
cInStr = string to be searched
cInChar = string looking for
nNthOccr = 'nth' occurance of cInChar.
SHORT:
Return the "nth" occurance of one string in another string (delimited).
DESCRIPTION:
_Nth_Occr() returns the position of "nNthOccr" occurance of string "cInChar"
in string "cInStr" or zero if cInChar string is not in cInStr at all or the
specified occurance is more than the number of occurances.
NOTE:
See also: _Extract()
EXAMPLE:
? _Nth_Occr('AB/CD/EF/GH','/',2) // Returns 6
? _Nth_Occr('AB/CD/EF/GH','/',3) // Returns 9
? _Nth_Occr('AB/CD/EF/GH','/',4) // Returns 0
******************************************************************************/